<template>
    <div>欢迎登录{{$store.state.count}}
        <button @click = "addBtn">增加</button>
    </div>
    
</template>
<script>
export default {
  created() {
    console.log(this.$store.state.count);
  },
  methods: {
    addBtn() {
        this.$store.commit('add');
    }
  }
};
</script>
<style scoped>
</style>


